//
//  LinkServers.h
//  HGMMT
//
//  Created by xingweixin on 2018/4/16.
//  Copyright © 2018年 eport_user1. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GCDAsyncSocket.h"

typedef void(^LinkBlock)(BOOL isSuccess);


typedef void(^CommunicationBlock)(NSData *date);

@interface LinkServers : NSObject
@property(nonatomic,copy)LinkBlock linkBlock;
@property(nonatomic,copy)CommunicationBlock communBlock;
@property (strong, nonatomic) GCDAsyncSocket *clientSocket;
@property (nonatomic,copy)NSString *linkhost;

//建立连接的方法
-(void)linkWithIdeCode:(NSString *_Nullable)code;

//单例
+ (LinkServers *)shareInstance;

//断开链接
-(void)disConnectSocket;
@end
